﻿# CMakeLists.txt: zchao_CMake_project 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#
cmake_minimum_required (VERSION 3.8)

# Enable Hot Reload for MSVC compilers if supported.
if (POLICY CMP0141)
  cmake_policy(SET CMP0141 NEW)
  set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
endif()

project ("zchao_CMake_project")

# 寻找 Eigen3 库
# find_package (Eigen3 REQUIRED NO_MODULE)

# 查找当前目录下的所有源文件,并将名称保存到 DIR_SRCS 变量
aux_source_directory(. DIR_SRCS)
# add_subdirectory(src/random_graph)
add_subdirectory(src/Louvain)
add_subdirectory(src/matrix_to_edgelist)
add_subdirectory(src/max_spanning_tree)
add_subdirectory(src/genetic_algorithm)
add_subdirectory(src/eigen_sparse_matrix)

# 指定 Eigen3 所在的路径
#INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})

# 将源代码添加到此项目的可执行文件。

add_executable (sinap_zchao ${DIR_SRCS})
# target_link_libraries(sinap_zchao Eigen3::Eigen)




# 添加链接库
# target_link_libraries (sinap_zchao Eigen3::Eigen)


target_link_libraries(sinap_zchao Louvain)
target_link_libraries(sinap_zchao matrix_to_edgelist)
target_link_libraries(sinap_zchao maximum_spanning_tree)
target_link_libraries(sinap_zchao genetic_algorithm)
target_link_libraries(sinap_zchao eigen_sparse_matrix)